package com.conan.dailyflickr.activity;

import android.app.Activity;
import android.os.Bundle;

import com.conan.dailyflickr.app.App;
import com.conan.dailyflickr.app.DailyFlickrApplication;
import com.conan.dailyflickr.app.Res;

public class MainActivity extends Activity {
	
	private App mApp = null;
	
    /** Called when the activity is first created. */
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);

        mApp = new App(MainActivity.this);

        ((DailyFlickrApplication) getApplication()).setActiveContext(
				getClass().getCanonicalName(), 
				this);

		setContentView(Res.layout.main);
	        
    }
    
     
    @Override
    protected void onResume() {
    	super.onResume();
    	// ...
    	if (mApp.isPaused()) {
    		// do something useful in here
    		// BLAH BLAH...
    		mApp.onResume();
    	}
    }
    
    @Override
    protected void onPause() {
    	super.onPause();
    	// ...
    	mApp.onPause();
    }
    
}